// 一、将下面异步代码使用Promise的方式改进
setTimeout(function () {
    var a = 'hello';
    setTimeout(function () {
        var b = 'lagou';
        setTimeout(function () {
            var c = 'I ❤ U';
            console.log(a + b + c);
        }, 10)
    }, 10)
}, 10)

function template() {
    return new Promise((resolve) => {
        setTimeout(() => {
            resolve();
        }, 10)
    })
}

template()
    .then(value => {
        var a = 'hello';
        return a;
    }).then(value => {
        var b = 'lagou';
        return value + b;
    }).then(value => {
        var c = 'I ❤ U';
        console.log(`1-1输出结果为：${value + c}`);
});
